#ifndef NULLMUSICSYSTEM_H
#define NULLMUSICSYSTEM_H

#pragma once
#include <IMusicSystem.h>

class CNULLMusicSystem : public IMusicSystem
{
protected:
	CTimeValue m_TimeValue;
	TMoodsHierarchyVec m_aoEmptyMoodsHierarchy;

public:
	CNULLMusicSystem() { }
	virtual ~CNULLMusicSystem() {}
	void Release() {}
	void Update() {}

	int GetBytesPerSample() { return 4; }
	IMusicSystemSink* SetSink(IMusicSystemSink *pSink) { return NULL; }
	bool SetData( SMusicInfo::Data *pMusicData ) {return true;}
	void Unload() {}
	void Pause(bool bPause) {}
	ILINE bool IsPaused() const {return false;}
	void EnableEventProcessing(bool bEnable) {}

	// Theme stuff
	bool SetTheme(const char *pszTheme, bool bForceChange=true, bool bKeepMood=true, int nDelayInMS=0, char const* const sStartMood = NULL) { return true; }
	virtual bool	EndTheme(EThemeFadeType ThemeFade=EThemeFade_FadeOut, int nForceEndLimitInSec=10, bool bEndEverything=true) { return true; };
	const char* GetTheme() const { return ""; }
	virtual CTimeValue GetThemeTime() const { return m_TimeValue; }

	// Mood stuff
	bool SetMood(const char *pszMood, const bool bPlayFromStart, const bool bForceChange) { return true; }
	bool SetDefaultMood(const char *pszMood) { return true; }
	const char* GetMood() const { return ""; }
	IStringItVec* GetThemes() const { return NULL; }
	IStringItVec* GetMoods(const char *pszTheme) const { return NULL; }
	virtual IStringItVec* const GetPatterns() const { return NULL; }
	bool AddMusicMoodEvent(const char *pszMood, float fTimeout) { return true; }
	virtual CTimeValue GetMoodTime() const { return m_TimeValue; }
	virtual TMoodsHierarchyVec const& GetMusicMoodHierarchy() const { return m_aoEmptyMoodsHierarchy; }

	SMusicSystemStatus* GetStatus() { return NULL; }
	void GetMemoryUsage(class ICrySizer* pSizer) const {}
	bool LoadMusicDataFromLUA(IScriptSystem* pScriptSystem, const char *pszFilename){return true;}
	void LogMsg( const int nVerbosity, const char *pszFormat, ... ) PRINTF_PARAMS(3, 4) {};
	virtual bool IsNullImplementation() const { return true; }
	virtual bool IsPlaying() const { return false; }
	virtual bool IsPatternFading() const { return false; }

	virtual float GetUpdateMilliseconds(){return 0.f;}

	//////////////////////////////////////////////////////////////////////////
	// Editing support.
	//////////////////////////////////////////////////////////////////////////
	virtual void RenamePattern( const char *sOldName,const char *sNewName ) {};
	virtual void UpdatePattern( SMusicInfo::Pattern *pPattern ) {};
	virtual void PlayPattern(char const* const sPattern, bool const bStopPrevious, bool const bPlaySynched, bool const bPlayOnTop) {};
	VIRTUAL bool StopPattern(char const* const sPatternNameToStop) { return false; }
	virtual void DeletePattern( const char *sPattern ) {};
	VIRTUAL char const* const GetPatternNameTrack1() const { return NULL; }
	virtual void Silence() {};
	virtual bool LoadFromXML( const char *sFilename, bool bAddData, bool bReplaceData) { return true; };
  virtual bool LoadFromXMLNode( const XmlNodeRef root, bool bAddData, bool bReplaceData) { return true; };

	virtual void PlayStinger() {};

#ifndef _RELEASE
	// Production only stuff
	VIRTUAL void DrawInformation(IRenderer* const pRenderer, float xpos, float ypos) {}
#endif // _RELEASE

	// For serialization where the called passed its own TSerialize object for serialization.
	VIRTUAL void Serialize(TSerialize ser) {}

	// For serialization where the called doesn't provide a TSerialize object for serialization.
	VIRTUAL void Serialize(bool const bSave) {}

	// Summary:
	//	 Registers listener to the music system.
	virtual void AddEventListener(IMusicSystemEventListener* const pListener) {}

	// Summary:
	//	 Removes listener to the music system.
	virtual void RemoveEventListener(IMusicSystemEventListener* const pListener) {}
};

#endif
